       // : 类型  类型约束
let str:string = "hello world";

// str = {};

str = "abc";

console.log(str);

                                //约束函数的返回值得类型
function demo(x:number,y:number):number{
    return x+y;
}

demo(1,2);

console.log(demo(3,4));